package com.bhs.sansonglogistics.ui.mine;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.bhs.sansonglogistics.R;
import com.bhs.sansonglogistics.base.BaseActivity;
import com.bhs.sansonglogistics.utils.MyUtils;
import com.bhs.sansonglogistics.utils.SharedPreferencesUtils;

/**
 * 账号安全
 */
public class AccountSecurityActivity extends BaseActivity implements View.OnClickListener {
    private TextView mTvPhone;

    @Override
    public int initLayout() {
        return R.layout.activity_account_security;
    }

    @Override
    public void initView() {

        TextView mTvTitle = findViewById(R.id.tv_title);
        mTvTitle.setText("账号安全");
        findViewById(R.id.ll_change_phone).setOnClickListener(this);
        mTvPhone = findViewById(R.id.tv_phone);
        findViewById(R.id.ll_close_account).setOnClickListener(this);
    }

    @Override
    public void initData() {
        mTvPhone.setText(MyUtils.phoneHide(SharedPreferencesUtils.getString(mActivity,"phone")));
    }

    @Override
    public void onClick(View view) {
        if(view.getId()==R.id.ll_change_phone){
            startActivity(new Intent(mActivity,ChangePhoneActivity.class));
        }else {
            startActivity(new Intent(mActivity,CloseAccountActivity.class));
        }
    }
}